home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#21 (Jun 87)
/
forth source
/
general defs
next >
Wrap
Text File
|
1987-04-05
|
3KB
|
132 lines
( general definitions )
HEX
44525652 CONSTANT "drvr
50524F43 CONSTANT "proc
434E544C CONSTANT "cntl
( *** System globals *** )
HEX
8FC CONSTANT JioDone
DECIMAL
( windowrecord fields, starting with grafport )
16 CONSTANT portRect ( Grafport rectangle )
( fields of WindowPeek )
108 CONSTANT windowKind
110 CONSTANT wVisible
111 CONSTANT wHiLited
112 CONSTANT goAwayFlag
113 CONSTANT spareFlag
130 CONSTANT dataHandle
140 CONSTANT controlList
152 CONSTANT refCon
( fields of device control entry )
4 CONSTANT dCtlFlags
6 CONSTANT dCtlQHdr
16 CONSTANT dCtlPosition
20 CONSTANT dCtlStorage
24 CONSTANT dCtlRefNum
26 CONSTANT dCtlCurTicks
30 CONSTANT dCtlWindow
34 CONSTANT dCtlDelay
36 CONSTANT dCtlEMask
38 CONSTANT dCtlMenu
( csCodes for Ctl calls )
-1 CONSTANT goodBye
64 CONSTANT accEvent
65 CONSTANT accRun
66 CONSTANT accCursor
67 CONSTANT accMenu
68 CONSTANT accUndo
70 CONSTANT accCut
71 CONSTANT accCopy
72 CONSTANT accPaste
73 CONSTANT accClear
( *** standard parameter block data structure *** )
0 CONSTANT qLink ( pointer to next queue entry [long word] )
4 CONSTANT qType ( queue type [word] )
6 CONSTANT ioTrap ( routine trap [word] )
8 CONSTANT ioCmdAddr ( routine address [long word] )
12 CONSTANT ioCompletion ( addr of completion routine [long word] )
16 CONSTANT ioResult ( result code returned here [word] )
18 CONSTANT ioNamePtr ( pointer to file name string [long word] )
22 CONSTANT ioVRefNum ( volume reference number )
24 CONSTANT ioRefNum
26 CONSTANT csCode ( type of control call )
28 CONSTANT csParam ( control call parameters )
( *** eventrecord data structure *** )
0 CONSTANT what
2 CONSTANT message
6 CONSTANT when
10 CONSTANT where
14 CONSTANT modifiers
( *** event codes *** )
0 CONSTANT null-evt
1 CONSTANT mousedn-evt
2 CONSTANT mouseup-evt
3 CONSTANT keydn-evt
4 CONSTANT keyup-evt
5 CONSTANT autokey-evt
6 CONSTANT update-evt
7 CONSTANT disk-evt
8 CONSTANT activate-evt
10 CONSTANT network-evt
11 CONSTANT driver-evt
0 CONSTANT inDesk
1 CONSTANT inMenuBar
2 CONSTANT inSysWindow
3 CONSTANT inContent
4 CONSTANT inDrag
5 CONSTANT inGrow
6 CONSTANT inGoAway
7 CONSTANT inZoomIn
8 CONSTANT inZoomOut
CODE shl ( data #bits )
MOVE.L (A6)+,D0
MOVE.L (A6),D1
LSL.L D0,D1
MOVE.L D1,(A6)
RTS
END-CODE MACH
CODE shr ( data #bits )
MOVE.L (A6)+,D0
MOVE.L (A6),D1
LSR.L D0,D1
MOVE.L D1,(A6)
RTS
END-CODE MACH
CODE on
MOVEQ.L #1,D0
MOVE.L (A6)+,A0
MOVE.L D0,(A0)
RTS
END-CODE MACH
CODE off
MOVE.L (A6)+,A0
CLR.L (A0)
RTS
END-CODE MACH
CODE unpack
MOVE.L (A6),D0
CLR.L D1
MOVE.W D0,D1
CLR.W D0
SWAP.W D0
MOVE.L D0,(A6)
MOVE.L D1,-(A6)
RTS
END-CODE MACH